#ifndef __HEAD_H__
#define __HEAD_H__

#include <my_header.h>
#include "task_queue.h"
#include "thread_pool.h"
#include "dir_stack.h"
#include "func.h"

typedef enum{
    TAGCD = 1,
    TAGLS,
    TAGREMOVE,
    TAGPWD,
    TAGMKDIR,
    TAGRMDIR,
    TAGGETS,
    TAGPUTS
}Tag;

#define EXIT_CHECK(ret, num, msg) \
    do { \
        if ((ret) == (num)) { \
            perror(msg); \
            exit(-1); \
        } \
    } while(0)
// 检查系统调用返回的指针是否为错误值 (通常是 NULL)
#define EXIT_CHECK_ON_PTR(syscall, msg) \
    do { \
        if ((syscall) == NULL) { \
            perror(msg); \
            exit(EXIT_FAILURE); \
        } \
    } while(0)


#endif
